package com.liezh.visitor;

import com.liezh.visitor.property.BeanDefinitionVisitor;
import com.liezh.visitor.property.StringBeanDefinition;
import com.liezh.visitor.router.LinuxRouterVisitor;
import com.liezh.visitor.router.RouterVisitor;
import com.liezh.visitor.router.TPLinkRouter;

/**
 * @author liezh
 * @date 2021-10-28
 */
public class Main {
    public static void main(String[] args) {
        TPLinkRouter router = new TPLinkRouter();
        RouterVisitor routerVisitor = new LinuxRouterVisitor();
        router.accept(routerVisitor);

        StringBeanDefinition stringBeanDefinition1 = new StringBeanDefinition("key1", "value1");
        StringBeanDefinition stringBeanDefinition2 = new StringBeanDefinition("key2", "value2");
        BeanDefinitionVisitor visitor = new BeanDefinitionVisitor();
        visitor.visitBeanDefinition(stringBeanDefinition1);
        visitor.visitBeanDefinition(stringBeanDefinition2);
        visitor.readProperty();
    }
}
